package com.dq.service.messsge;

import com.dq.exception.customException.AdminException;
import com.dq.domain.subscribe.Subscribe;
import com.dq.domain.message.oneself.SubscribeMessage;

/**
 * @author cf
 *
 */
public interface SubscribeMessageService {
    /**
     * 添加
     * @param subscribeMessage
     * @return
     * @throws AdminException
     */
    public SubscribeMessage save(SubscribeMessage subscribeMessage, SubscribeMessage.UserType userType, String content) throws AdminException;

    /**
     *修改
     * @param subscribeMessage
     * @return
     * @throws AdminException
     */
    public SubscribeMessage update(SubscribeMessage subscribeMessage) throws AdminException;
    /**
     * 预约创建， 开启延时任务
     * @param subscribe
     */
    public void subscribeRedisBegin(Subscribe subscribe);
    /**
     * 循环推送消息
     * @param messageKey
     */
    public void subscribeRedis(String messageKey);

}
